#!/usr/bin/perl
#Array Creation:

@array1 = (1, 2, 'Hello');
@array2 = qw/This is an array/;

@days = qw/Monday
Tuesday
Sunday/;

$array2[0] = 'Monday';
$array2[1] = 'Sunday';


#extracting individual elements

@shortdays = qw/Mon Tue Wed Thu Fri Sat Sun/;
print $shortdays[1];
print $shortdays[0]; # Outputs Mon
print $shortdays[6]; # Outputs Sun
print $shortdays[-1]; # Also outputs Sun
print $shortdays[-7]; # Outputs Mon





#Array Size

@array = (1,2,3);
$array[50] = 4;

print "Size: ",scalar @array,"\n";
print "Max Index: ", $#array,"\n";


